<template>
  <button @click="getjson">getjson</button>
  <formDesigner ref="popupRef" @getResult="handleSubmit"></formDesigner>
</template>
<script setup lang="ts">
import { ref, reactive } from "vue";
import formDesigner from "@/components/form/index";

const popupRef = shallowRef<InstanceType<typeof formDesigner>>();

const getjson = () => {
  let data = popupRef?.value.showJson();
  console.log("getjson:", data);
};
/**
 * 点击保存按钮
 * @param e
 */
const handleSubmit = (e: any) => {
  console.log("父组件接受到消息:", e);
};
</script>
<style>
.h-full {
  height: 100vh;
}
._fc-t-header {
  height: 60px;
  margin: 0 20px;
  position: relative;
  display: flex;
  align-items: center;
  cursor: default;
}

._fc-t-logo {
  height: 26px;
}

._fc-t-name {
  display: inline-block;
  color: rgba(0, 0, 0, 0.8);
  font-size: 20px;
  font-weight: 600;
  margin-left: 5px;
}

._fc-t-menu {
  position: absolute;
  right: 0;
}

._fc-t-menu i {
  font-size: 12px;
}
</style>
